"""
    房屋出租系统的主程序
"""

# 导入模块
from house_operation import *


def main():
    # 调用main_menu函数 显示主菜单
    # 循环显示菜单
    while True:
        main_menu()
        key = input("请输入您的选择：")
        if key in ["1", "2", "3", "4", "5", "6"]:
            if key == "1":
                add_house()
            elif key == "2":
                query_house()
            elif key == "3":
                delete_house()
            elif key == "4":
                update_house()
            elif key == "5":
                show_house()
            elif key == "6":
                if exit_system():
                    break
            else:
                print("您输入的选项有误，请重新输入！")


if __name__ == "__main__":
    main()
    print("你退出了程序，欢迎下次使用")
